define(function (require) {
    var carousehub = require('module/DirectiveModule');
    carousehub.directive('carousehub', function () {
        return {
            scope: {},
            restrict: 'AE',
            template: require('text!template/CarouselHub.html'),
            replace: true,
            controller: function ($scope, $element, iptvService) {
                $scope.carouses = iptvService.recommendList();
                $scope.moreLink = function (data) {
                    ePart.pcUtils.stateUrl().go('index.VodDetail', {vodNumber: data});
                };
                _.defer(function () {
                    $('.discoverHub .flexslider').flexslider({
                        slideshowSpeed: 4000,
                        animationSpeed: 400,
                        touch: true
                    });
                });
            }
        }
    });
});